const btn = document.getElementById('modeBtn')

btn.addEventListener('click',(e) => {
    const body = document.body
    console.log(e,'.......');
//
    if(e.target.innerHTML === '白天'){
        // 职责分离点
        body.className = 'night'
        // body.style.backgroundColor = 'black'
        // body.style.color = 'white'
        e.target.innerHTML = '夜晚'
    } else{
        body.className = "light"
        // body.style.backgroundColor = 'white'
        // body.style.color = 'black'
        e.target.innerHTML = '白天'
    }
})
